<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>超出部分</title>
</head>
<style>
    .container {
        height: 150px;
        width: 250px;
        border: 1px solid #333;
        /* hidden 将超出的部分街区，不显示
        scroll 不管内容有没有超出父元素，都加上滚动条
        auto 只要当元素超出父元素时，才加滚动条 */
        /* overflow: hidden; */
        overflow: scroll;
        /* overflow: auto; */
    }
    .content {
        height: 100px;
        width: 200px;
        background-color: red;
    }
</style>
<body>
    <div class="container">
        <div class="content"></div>
    </div>
</body>
</html>